package com.easybacklog.client.cucumberfeatures.edit;

import com.easybacklog.client.model.ProjectFeature;
import com.google.gwt.user.client.ui.ListBox;

public class StatusList extends ListBox {

	public StatusList(String status) {

		this.setWidth("100px");

		this.addItem(ProjectFeature.STANDBY_STATUS);
		this.addItem(ProjectFeature.INPROGRESS_STATUS);
		this.addItem(ProjectFeature.DONE_STATUS);
		this.addItem(ProjectFeature.DISCARD_STATUS);

		if (ProjectFeature.STANDBY_STATUS.equals(status)) {

			this.setSelectedIndex(0);

		} else if (ProjectFeature.INPROGRESS_STATUS.equals(status)) {

			this.setSelectedIndex(1);

		} else if (ProjectFeature.DONE_STATUS.equals(status)) {

			this.setSelectedIndex(2);

		} else if (ProjectFeature.DISCARD_STATUS.equals(status)) {

			this.setSelectedIndex(3);
		}
	}
}
